package com.usian.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.usian.pojo.Emp;
import com.usian.pojo.User;
import com.usian.pojo.Vo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface EmpMapper extends BaseMapper<Emp> {

    @Select("select * from user1 where uname=#{uname} and pwd=#{pwd}")
    User findByName(@Param("uname") String uname,@Param("pwd")  String pwd);

    @Select("select * from emp e,dept d,zhiwu z where e.`did`=d.`did` and e.`zid`=z.`zid` and d.`did`=z.`did`")
    List<Vo> findAll();

    @Select("select * from emp e,dept d,zhiwu z where e.`did`=d.`did` and e.`zid`=z.`zid` and d.`did`=z.`did`")
    Page<Vo> findPage(String queryString);
}
